<?php

namespace App\Library\Requests\ProductOrderReturn;

use App\Library\Requests\Base\SerialNumberRequest;
use App\Library\Rules\MediasImgRule;
use App\Library\Rules\SpecRule;

class ProductOrderReturnApplyRequest extends SerialNumberRequest
{
    public function rules(): array
    {
        return array_merge(parent::rules(), [
            'type' => 'required|integer|in:1,2',
            'reason' => 'required|integer|in:1,2',
            'array' => ['required', 'array', new SpecRule],
            'fileIds' => ['nullable', 'array', new MediasImgRule],
            'remark' => 'nullable|string|max:255',
        ]);
    }
}
